<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>华联商场后台管理系统</title>
    <link rel="stylesheet"  type="text/css"  href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet"   href="/css/goodsclass.css">
    <style>
        thead tr{
            background-color: rgba(102,102,102,1);
            color: #fff;
        }
        table{
            background: #FFFFFF;
            border: 1px solid #CCCCCC;
            border-radius: 2px;
        }
        tbody tr:nth-child(odd){
            background-color: #FAFAFA;
        }
        input[type=checkbox]{
            width: 14px;
            height: 14px;

        }
    </style>
</head>
<body>
<div class="right">
    <div class="page-header ">
        <div class="row" style="padding: 0 22px;text-align: center">
            <form  name="form1" class="search_wrapper" action = "{:url('admin/category/select')}" method = "post" >
                <select class="select" name="grade" value="">
                    <option  value="" >按分类查找</option>
                    <option  value="0" >一级分类</option>
                    <option  value="1" >二级分类</option>
                    <option  value="2" >三级分类</option>
                </select>
                <input type="text" class="search" placeholder="请输入关键字 如：牛奶" name = "categroy_name">
                <button type="submit" id="submit"  class="btn btn-info ">搜索</button>
                <a href="{:url('category/insert')}" class="btn btn-info ">新增</a>
                <a href="{:url('admin/category/index')}" class="btn btn-default ">刷新</a>
            </form>
        </div>
    </div>
    <div class="row">
        <table class="table table-hover  good_item">
            <thead>
            <tr>
                <td class="col-xs-2">名称</td>
                <td class="col-xs-2">商品级别</td>
                <td class="col-sm-2">图片</td>
                <td class="col-sm-2">操作</td>
            </tr>
            </thead>
            <tbody>
            {volist name = 'result' id = 'value'}
            <tr >
                <input type="text" hidden class="id" name="id" value="{$value.id}">
                <input type="text" hidden class="goodtype1" name="type1" value="">
                <input type="text" hidden class="goodtype2" name="type2" value="">
                <input type="text" hidden class="type" value="{$value.grade}"/>
                <td class="name">
                    {if condition="$value.level eq 1"}
                    一级分类
                    {elseif condition="$value.level eq 2"}
                    <?php echo str_repeat("&nbsp;",$value["level"]*8)?>
                    二级分类
                     {elseif condition="$value.level eq 3"}
                    <?php echo str_repeat("&nbsp;",$value["level"]*10)?>
                    三级分类
                    {/if}
                    <b>{$value.categroy_name}</b>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
</div>
</body>
</html>